package order;

import logger.FileLogger;
import logger.Logger;
import logger.MySQLLogger;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-04-06
 * Time: 9:15
 */

public class MySQLLog implements AbsFactory{

    @Override
    public Logger createLogger(String type) {
        //创建一个SQL日志记录文件
        Logger logger = null;
        if (type.equals("mysql")){
            logger = new MySQLLogger();
        }else if (type.equals("file")){
            logger = new FileLogger();
        }else {
            System.out.println("没有指定的日志文件");
        }
        return logger;
    }
}
